﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SolutionSorter.Core
{
	public class SolutionItem
	{
		public Guid Id { get; set; }
		public string Name { get; set; }
		public string Path { get; set; }
		public Guid ParentId { get; set; }
		public string Text { get; set; }
		public string NestedProjectText { get; set; }

		private SortedList<string, SolutionItem> _children = new SortedList<string, SolutionItem>();
		public SortedList<string, SolutionItem> Children { get { return _children; } }

		public SolutionItem(Guid id, string name, string path, string text)
		{
			this.Id = id;
			this.Name = name;
			this.Path = path;
			this.Text = text;
		}

		public void AddChild(SolutionItem child)
		{
			_children.Add(child.Name, child);
		}
	}
}
